import { h } from 'vue';
import { Image } from '@arco-design/web-vue';
import { BasicColumn } from '@/components/Table/index';

export const columns: BasicColumn[] = [
  {
    title: 'id',
    dataIndex: 'id',
    width: 100,
  },
  {
    title: '名称',
    dataIndex: 'name',
    width: 100,
  },
  {
    title: '头像',
    dataIndex: 'avatar',
    width: 100,
    render({ record }) {
      return h(Image, {
        width: 48,
        style: 'width:48px;height:48px',
        src: record.avatar,
        class: 'cursor-pointer',
      });
    },
  },
  {
    title: '地址',
    dataIndex: 'address',
    width: 150,
  },
];
